import time
from asyncio import sleep
from async_logs import logs
async def get(async_driver,url:str=r'http://www.baidu.com'):
    await async_driver.get(url)


async def seacher(async_driver,search:str='软件测试'):
    await async_driver.send_keys('id','kw',text=search)
    await async_driver.click('id','su')
    
    
    
async def searcher2(async_driver,search:str='性能测试'):
    await async_driver.send_keys('id','kw',text=search)
    await async_driver.click('id','su')
    
    

async def searcher3(async_driver,search:str='自动化测试'):
    await async_driver.send_keys('id','kw',text=search)
    await async_driver.click('id','su')
    
@logs
async def test_search(async_driver):
    await get(async_driver)
    await sleep(2)
    await seacher(async_driver)
    await sleep(2)
    assert await async_driver.find_element('id','kw')

    